<template>
  <div>
    <h1>问卷结果</h1>
  </div>
  <div class="item" v-for="item in result" :key="item">{{ item }}</div>
</template>
<script>
import { useRoute } from "vue-router";
import { ref } from "vue";
import api from "../api";
export default {
  setup() {
    const route = useRoute();
    const id = JSON.parse(route.params.id);
    let result = ref({});
    result.value = JSON.parse(api.getHistory(id).question);
    return {
      result,
    };
  },
};
</script>
<style lang='less'>
.item {
  width: 100%;
  padding: 5px;
  box-sizing: border-box;
  border: 1px solid lightblue;
  border-radius: 5px;
  margin-top: 10px;
}
</style>